package com.twu.biblioteca.menuitems;

import com.twu.biblioteca.BibliotecaLibrary;
import com.twu.biblioteca.menu.Menu;
import com.twu.biblioteca.menu.MenuItem;

/**
 * Created with IntelliJ IDEA.
 * User: ama
 * Date: 10/10/13
 * Time: 6:24 PM
 */
public class DisplayAvailableBooksMenuItem extends MenuItem {
    BibliotecaLibrary bibliotecaLibrary;

    public DisplayAvailableBooksMenuItem(BibliotecaLibrary bibliotecaLibrary) {
        super("L1", "View available books");
        this.bibliotecaLibrary = bibliotecaLibrary;
    }

    @Override
    public void runOption() {
        Menu.print(bibliotecaLibrary.getBooksInLibrary());
    }
}
